/* 首页的接口 */
import {
  getAction,
  postAction,
  putAction,
  deleteAction,
} from "../utils/request.js";

// 实名认证
const authentication = (params) =>
  postAction("/mini/user/Authentication/authentication", params);

// 实名认证 -- 详情
const AuthenticationDetail = (params) =>
  getAction("/mini/user/Authentication/detail", params);

// 待办事项 -- 代办事项数量
const findAgencyCount = (params) =>
  getAction("/mini/police/check_unqualified/find_agency_count", params);

// 行业动态 -- 选择行业
const pageIndustry = (params) => getAction("/app/home/page/industry", params);

//  信息维护----------------------------
// 信息维护 下的子项
const featuredIndustry = (params) =>
  getAction("/mini/featured/industry", params);

// 从业人员 -- 列表/详情
const employeesList = (params) =>
  getAction("/mini/featured/employees/list", params);

// 从业人员 -- 新增/编辑
const employeesOperation = (params) =>
  putAction("/featured/employees/operation", params);

// 从业人员 -- 详情
const employeesDetail = (params) =>
  getAction("/mini/featured/employees/detail", params);

// 从业人员 -- 删除
const employeesRemove = (id, departTime) =>
  deleteAction(
    `/mini/featured/employees/remove?id=${id}&departTime=${departTime}`
  );

// 设备信息 -- 列表
const equipmentList = (params) =>
  getAction("/mini/featured/equipmentList", params);

// 查询设备类型;
const featureQueryDeviceType = (params) =>
  getAction("/mini/featured/queryDeviceType", params);

// 设备信息 -- 新增
const featuredEquipment = (params) =>
  postAction("/mini/featured/equipment", params);

// 设备信息 -- 删除
const featuredEquipmentDelete = (params) =>
  deleteAction(`/mini/featured/equipment`, params);

// 房客信息 -- 列表
const tenantList = (params) => getAction("/mini/featured/tenant/list", params);

// 房客信息 -- 新增
const tenantOperation = (params) =>
  putAction("/mini/featured/tenant/operation", params);

//入住访客人数
const featuredNumber = (params) => getAction("/mini/featured/number", params);

// 行业信息 -- 详情
const featuresInfoDetail = (params) =>
  getAction("/mini/hotel/features_info/detail", params);

// 行业信息 -- 保存
const featuresInfoSave = (params) =>
  postAction("/mini/hotel/features_info/save", params);

// 场所信息 -- 详情
const findCompany = (params) =>
  getAction("/company/info_detail/find_company", params);

// 场所信息 -- 保存
const infoDetailSave = (params) =>
  postAction("/company/info_detail/save", params);

// 安防信息 -- 详情
const publicSecurityDetail = (params) =>
  getAction("/industry/public_security/detail", params);

// 安防信息 -- 保存
const publicSecuritySave = (params) =>
  postAction("/industry/public_security/save", params);

// 安防信息 -- 人防情况 -- 负责人
const dutyPersonDetail = (params) =>
  getAction("/mini/company/duty_person/detail", params);

// 安防信息 -- 联防队员 -- 列表
const jointDefencePersonPage = (params) =>
  getAction("/mini/company/joint_defence_person/page", params);

// 安防信息 -- 联防队员 -- 新增
const jointDefencePersonAdd = (params) =>
  postAction("/mini/company/joint_defence_person/add", params);

// 安防信息 -- 联防队员 -- 详情
const jointDefencePersonDetail = (params) =>
  getAction("/mini/company/joint_defence_person/detail", params);

// 安防信息 -- 联防队员 -- 删除
const jointDefencePersonDel = (id) =>
  deleteAction(`/mini/company/joint_defence_person/del?id=${id}`);

// 首页 -- 弹框 待签订 -- 提醒
const findWaitSignCount = (params) =>
  getAction("/sys/document_company/find_wait_sign_count", params);

//  重要提醒----------------------------
// 重要提醒 -- 列表
const importantReminder = (params) =>
  getAction("/app/home/page/importantReminder", params);

// 重要提醒未读数
const importantReminderNotReading = (params) =>
  getAction("/app/home/page/importantReminderNotReading", params);

// 重要提醒详情
const importantReminderDetail = (params) =>
  getAction("/app/home/page/importantReminder/detail", params);

//  功能分类----------------------------------------------
// 出租屋的---------------------
// 小区出租屋列表
const housePage = (params) => getAction("/mini/rental/house/page", params);

// 添加小区出租屋
const improveHouseInformation = (params) =>
  postAction("/mini/rental/insert/improveHouseInformation", params);

// 添加小区出租屋 -- 自主申报
const insertminiAdd = (params) =>
  postAction("/mini/rental/insert/mini_add", params);

// 小区详情
const houseDetail = (params) => getAction("/mini/rental/house/detail", params);

// 恢复出租
const restoreRental = (params) =>
  getAction("/mini/rental/house/restoreRental", params);

// 暂停出租
const houseSuspendRental = (params) =>
  getAction("/mini/rental/house/suspendRental", params);

// 删除房屋
const removeHouse = (id) =>
  deleteAction(`/mini/rental/house/remove_house?id=${id}`);

// 添加主租人
const houseTenantInsert = (params) =>
  postAction("/mini/rental/house_tenant/insert", params);

// 添加同住人
const insertCohabit = (params) =>
  postAction("/mini/rental/house_tenant_cohabit/insert_cohabit", params);

// 自建房---------------------------------------------------------------
// 自建房出租屋列表
const selfHousePage = (params) =>
  getAction("/mini/rental/self_house/selfPage", params);

// 自建房出租屋详情
const selfHouseDetail = (params) =>
  getAction("/mini/rental/self_house/detail", params);

// 添加自建房出租屋
const selfHouseImproveHouseInformation = (params) =>
  postAction("/mini/rental/self_house/improveHouseInformation", params);

// 添加自建房出租屋  -- 自主申报
const selfHouseminiAdd = (params) =>
  postAction("/mini/rental/self_house/mini_add", params);

// 选择小区
const findRentalNeighbourhood = (params) =>
  getAction("/mini/rental/insert/findRentalNeighbourhood", params);

// 选择楼栋
const findRentalBuilding = (params) =>
  getAction("/mini/rental/insert/findRentalBuilding", params);

// 选择单元
const findRentalUnit = (params) =>
  getAction("/mini/rental/insert/findRentalUnit", params);

// 选择楼层
const findRentalFloor = (params) =>
  getAction("/mini/rental/insert/findRentalFloor", params);

// 选择房间
const findRentalHouse = (params) =>
  getAction("/mini/rental/insert/findRentalHouse", params);

// 选择房屋编号
const findRentalSelfHouse = (params) =>
  getAction("/mini/rental/self_house/findRentalSelfHouse", params);

// 恢复出租
const selfHouseRestoreRental = (params) =>
  getAction("/mini/rental/self_house/restore_rental", params);

// 暂停出租
const selfHouseSuspendRental = (params) =>
  getAction("/mini/rental/self_house/suspend_rental", params);

// 删除房屋
const removeSelfOwner = (id) =>
  deleteAction(`/mini/rental/self_house/remove_self_owner?id=${id}`);

// 添加主租人
const houseTenantInsertSelf = (params) =>
  postAction("/mini/rental/house_tenant/insert_self", params);

// 添加同住人
const insertSelfCohabit = (params) =>
  postAction("/mini/rental/house_tenant_cohabit/insert_self_cohabit", params);

// 小区和自建房公用----------------------------------
// 同住人列表
const houseTenantCohabitPage = (params) =>
  getAction("/mini/rental/house_tenant_cohabit/page", params);

// 同住人删除
const delSelfCohabit = (params) =>
  getAction("/mini/rental/house_tenant_cohabit/del_self_cohabit", params);

// 历史租客列表
const houseHistoryTenantPage = (params) =>
  getAction("/mini/rental/house_history_tenant/page", params);

// 历史租客详情
const houseHistoryTenantDetail = (params) =>
  getAction("/mini/rental/house_history_tenant/detail", params);

// 历史同住人列表
const houseHistoryCohabitPage = (params) =>
  getAction("/mini/rental/house_history_cohabit/page", params);

// 现居租客列表
const houseTenantPage = (params) =>
  getAction("/mini/rental/house_tenant/page", params);

// 现居租客详情
const houseTenantDetail = (params) =>
  getAction("/mini/rental/house_tenant/detail", params);

// 续租
const insertRelet = (params) => postAction("/mini/rental/insert/relet", params);

// 退租
const insertRentingOut = (params) =>
  postAction("/mini/rental/insert/rentingOut", params);

// 查看合同
const insertContract = (params) =>
  getAction("/mini/rental/insert/contract", params);

// 添加自主申报 --  选择所属辖区
const findJurisdictionList = (params) =>
  getAction("/mini/police/jurisdiction/find_jurisdiction_list", params);

// 线索上报---------------------
// 分页
const pendingProcessedPage = (params) =>
  getAction("/common/clue_reporting/page", params);

// 新增 -- 选择派出所
const findPolice = (params) =>
  getAction("/common/sys/police_agency/find_base_police_page", params);

//  新增线索上报
const clueReportingSave = (params) =>
  postAction("/common/clue_reporting/save", params);

// 待处理详情
const pendingProcessingDetail = (params) =>
  getAction("/mini/common/clue_reporting/detail", params);

// 删除待处理
const clueReportingDelete = (params) =>
  getAction("/mini/common/clue_reporting/delete", params);

// 隐患上报---------------------
// 分页
export const risk_page = (params) =>
  getAction("/common/risk_reporting/page", params);

//  新增隐患上报
export const risk_add = (params) =>
  postAction("/common/risk_reporting/save", params);

// 待处理详情
export const risk_detail = (params) =>
  getAction("/mini/common/risk_reporting/detail", params);

// 删除待处理
export const risk_delete = (params) =>
  getAction("/mini/common/risk_reporting/delete", params);

// 矛盾纠纷上报---------------------
// 分页
export const disputes_page = (params) =>
  getAction("/common/disputes_reporting/page", params);

//  新增隐患上报
export const disputes_add = (params) =>
  postAction("/common/disputes_reporting/save", params);

// 待处理详情
export const disputes_detail = (params) =>
  getAction("/mini/common/disputes_reporting/detail", params);

// 删除待处理
export const disputes_delete = (params) =>
  getAction("/mini/common/disputes_reporting/delete", params);

// 投诉建议---------------------
// 投诉列表
const complaintMessagePage = (params) =>
  getAction("/common/complaint_message/page", params);

// 投诉 -- 新增
const complaintMessageSave = (params) =>
  postAction("/common/complaint_message/save", params);

// 投诉 -- 详情
const complaintMessageDetail = (params) =>
  getAction("/mini/common/complaint_message/detail", params);

// 建议列表
const adviseMessagePage = (params) =>
  getAction("/common/advise_message/page", params);

// 建议 -- 新增
const adviseMessageSave = (params) =>
  postAction("/common/advise_message/save", params);

// 建议 -- 详情
const adviseMessageDetail = (params) =>
  getAction("/mini/common/advise_message/detail", params);

// 详细地址
const likeUnitsRoomList = (params) =>
  getAction("/common/area/likeUnitsRoomList", params);

export {
  authentication,
  AuthenticationDetail,
  findAgencyCount,
  pageIndustry,
  featuredIndustry,
  employeesList,
  employeesOperation,
  employeesDetail,
  employeesRemove,
  equipmentList,
  featureQueryDeviceType,
  featuredEquipment,
  featuredEquipmentDelete,
  tenantList,
  tenantOperation,
  featuredNumber,
  featuresInfoDetail,
  featuresInfoSave,
  findCompany,
  infoDetailSave,
  publicSecurityDetail,
  publicSecuritySave,
  dutyPersonDetail,
  jointDefencePersonPage,
  jointDefencePersonAdd,
  jointDefencePersonDetail,
  jointDefencePersonDel,
  findWaitSignCount,
  importantReminder,
  importantReminderNotReading,
  importantReminderDetail,
  housePage,
  improveHouseInformation,
  insertminiAdd,
  houseDetail,
  restoreRental,
  houseSuspendRental,
  removeHouse,
  houseTenantInsert,
  insertCohabit,
  selfHousePage,
  selfHouseDetail,
  selfHouseImproveHouseInformation,
  selfHouseminiAdd,
  findRentalNeighbourhood,
  findRentalBuilding,
  findRentalUnit,
  findRentalFloor,
  findRentalHouse,
  findRentalSelfHouse,
  selfHouseRestoreRental,
  selfHouseSuspendRental,
  removeSelfOwner,
  houseTenantInsertSelf,
  insertSelfCohabit,
  houseTenantCohabitPage,
  delSelfCohabit,
  houseHistoryTenantPage,
  houseHistoryTenantDetail,
  houseHistoryCohabitPage,
  houseTenantPage,
  houseTenantDetail,
  insertRelet,
  insertRentingOut,
  insertContract,
  findJurisdictionList,
  pendingProcessedPage,
  findPolice,
  clueReportingSave,
  pendingProcessingDetail,
  clueReportingDelete,
  complaintMessagePage,
  complaintMessageSave,
  complaintMessageDetail,
  adviseMessagePage,
  adviseMessageSave,
  adviseMessageDetail,
  likeUnitsRoomList,
};